<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="css/denglu.css">
    <link rel="stylesheet" href="css/base.css">
  
</head>
<body>
    <div id="head2_wrap">
        <header>
            <div class="logo">
                <a href="http://www.juooo.com"></a>
            </div>
            <h2 class="title">汇聚每一个感动</h2>
        </header>
    </div>
    <div id="content">
        <div>
           <ul>
               <li><a>短信登录</a></li>
               <li><a>密码登录</a></li>
           </ul>
           <input type="text" placeholder="中国 +86 |" id='username'>
           <input type="text" placeholder="请输入验证码" id='password'>
           <span class='forget'><a href="">忘记密码</a></span>
           <input type="button" value='登录' id='btn2'>
           <span class='next'>
               <a href="zhuce.html">立即注册</a>
          
           </span>
        </div>

    </div>

    <div id="foot_wrap2">
        <footer>
            <ul>
                <li><a href="">关于聚橙</a></li>
                <li><a href="">联系我们</a></li>
                <li><a href="">加入我们</a></li>
                <li><a href="">加盟聚橙</a></li>
                <li><a href="">服务条款</a></li>
                <li><a href="">媒体报道</a></li>
                <li><a href="">合作伙伴</a></li>
                <li><a href="">网站地图</a></li>
            </ul>
            <p>全国统一客服电话:400-185-8666 深圳市聚橙网技术有限公司</p>
            <p>Copyright 2007-2016 &copy;聚橙网 粤B2-20070272|粤ICP备09218027号</p>
        </footer>
    </div>
</body>
</html>
<script src='js/ajax.js'></script>
<script>

  var btn2=document.getElementById('btn2');
  btn2.onclick=function(){
      loadData()
  }
  function loadData(){
    var username=document.getElementById('username');
    var password=document.getElementById('password')

    var data=Ajax('POST','http://39.105.192.164:9090/apitest/login',`username=${username.value}&password=${password.value}`)
    .then(function(data){
        console.log(data)
    })
  

}
      
</script>